﻿namespace Sessionizer.Core
{
    /// <summary>
    /// Builds new ISessionConfiguration instance.
    /// </summary>
    public interface ISessionConfigurationBuilder
    {
        /// <summary>
        /// Configures custom factory for data in session
        /// </summary>
        /// <typeparam name="TData">Type of data</typeparam>
        /// <typeparam name="TFactory">Type of factory</typeparam>
        /// <returns>Current builder instance</returns>
        ISessionConfigurationBuilder Declare<TData, TFactory>() where TFactory : ISessionsFactory<TData>;

        /// <summary>
        /// Builds new configuration using current builder's state.
        /// Resets current builder's state.
        /// </summary>
        /// <returns>Built configuration.</returns>
        ISessionConfiguration Build();
    }
}